package com.zrar.ak.gkpt.service.common;

import com.zrar.ak.gkpt.model.bo.CommonAnnexInfoBO;
import com.zrar.ak.gkpt.model.vo.UserVO;
import com.zrar.ak.gkpt.util.JsonResult;
import org.springframework.web.multipart.MultipartFile;

/**
 * @InterfaceName: ICommonAnnexInfoService
 * @Description 附件上传和下载操作Service层接口
 * @Author liyang
 * @Time 2020/04/02
 */
public interface ICommonAnnexInfoService {

    /**
     * 保存上传文件和文件相关信息
     * @param jsonResult
     * @param file
     * @param annexStatus
     * @param userVO
     * @return
     */
    JsonResult annexUpload(JsonResult jsonResult, MultipartFile file, String annexStatus, UserVO userVO);

    /**
     * 根据附件主键id获取附件信息
     * @param id
     * @return
     */
    CommonAnnexInfoBO getAnnexInfoById(String id);

    /**
     * 根据附件主键id对附件进行删除操作
     * @param jsonResult
     * @param id
     * @param userVO
     * @return
     */
    JsonResult annexDelete(JsonResult jsonResult, String id, UserVO userVO);
}
